package com.heima.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Document("ap_comment")
@AllArgsConstructor
@NoArgsConstructor
public class Comment implements Serializable {
    @Id //映射文档中的id
    private String id;
    @Field
    private Integer authorId;
    @Field
    private String authorName;
    @Field
    private String entryId; //文章id
    @Field
    private Integer channelId;
    @Field
    private Integer type;
    @Field
    private String content;
    @Field
    private String image;
    @Field
    private Integer likes;
    @Field
    private Short reply;
    @Field
    private Short flag;
    @Field
    private String longitude;
    @Field
    private String latitude; // 纬度 Same as longitude
    @Field
    private String address; // 地址 Assuming it can be null or of some specific type (e.g., String), need further clarification
    @Field
    private String ord;
    @Field
    private LocalDateTime createdTime;
    @Field
    private LocalDateTime updatedTime;
    @Field
    private Short operation;
}

